The present invention relates to digital representations of typographic characters or other symbols, and more particularly, to a system, method, and computer-readable medium for generating outline fonts.
Many font generating systems exist for generating Asian character fonts (xe2x80x9cAsian fontsxe2x80x9d). An Asian font is composed of a large number of ideographs that represent the characters in the Asian language. Asian languages may include thousands of characters. For example, the Chinese language includes over twenty-thousand distinct characters.
One conventional computer technique for generating character patterns in an Asian font uses font outlines. This system is described in xe2x80x9cPostScript Language Tutorial and Cookbookxe2x80x9d by Adobe Systems, Inc. (Addison-Wesley Publishing, 1985). In this method, the outline of a character pattern is stored as a collection of straight lines and curves. There are some disadvantages associated with this technique. First, because different font outlines must be defined and stored for tens of thousands of different characters, the memory requirement is relatively high. Second, the font outlines that are stored in high resolution are suited for display only in high resolution; they are not suited for high-quality display in relatively low resolution.
Another method of generating an Asian font uses stroke-based character pattern data, wherein each stroke within a character is defined separately. A character typically consists of multiple strokes that overlap or intersect with each other. Such stroke-based character pattern data include key points, width values, feature points, and curve ratios to define each stroke, and are described in U.S. Pat. No. 6,157,390 and U.S. Pat. No. 5,852,448, both assigned to the assignee of the present application and explicitly incorporated herein. This stroke-based technique is suited for reducing the memory requirements for fonts. Further, the stroke-based character font is well suited when extremely high-quality font display is required. However, the stroke-based font is not suited for font communication among different systems. Several strokes in a character that intersect or overlap with each other create a complicated overall geometric shape, which makes the filling in the shape""s outline rather complicated. The processing of such a complicated shape becomes very difficult, especially when the font needs to be communicated between different systems having different resolutions. For example, a typical display character space is defined as 256xc3x97256, while a typical dot matrix printer has a character space of only 24xc3x9724.
The present invention provides a system, method, and computer-readable medium for generating a glyph-based outline font, which has a relatively low memory requirement and allows for font communication between various devices having different resolutions. As used herein, a glyph is a subunit of an Asian character, an Asian character typically consists of one or more glyphs. Each glyph, in turn, is formed of one or more strokes.
A method of the present invention first defines a set of basic glyphs, which will be used for defining characters. The characters defined by basic glyphs are suited for display on an output device having either high or low resolution. The method initially retrieves a set of characters that include similarly shaped glyphs. Next, the method selects one basic glyph that best represents the similarly shaped glyphs topographically. Then, the method defines feature points along the outline of the basic glyph. The method thereafter defines key points and width values. Key points are placed at edges or intersecting or bent portions of the basic glyph, so that moving the key points will change the outline shape of the basic glyph. Width values are also placed at locations within the basic glyph so that changing the width values will change the outline shape of the basic glyph. The method then defines equations that obtain the feature points based on the key points and the width values. Next, the method defines curve ratios and stores them in a curve level table. Curve ratios are stored according to various resolution levels, and designed to create curve segments between two consecutive feature points. Because curve ratios are stored at various resolution levels, the method is capable of creating high-quality curve segments regardless of the resolution level of a particular output device used. The method repeats these steps until all basic glyphs are defined, i.e., all glyphs in the set of characters are represented by at least one basic glyph.
In accordance with one aspect of the present invention, the method for defining basic glyphs further includes dividing the basic glyph into one or more single run-length regions. A single run-length region is a solid area within the basic glyph that contains no holes and can be filled with a single scan run. Thus, storing the basic glyph as a collection of several single run-length regions makes it simpler to fill within the basic glyph.
In accordance with another aspect of the invention, the steps included in the method for defining basic glyphs may be performed manually using a computer graphical user interface tool, or automatically using suitable image analysis techniques.
In accordance with yet another aspect of the invention, a method of defining a set of characters using a set of predefined basic glyphs is provided. As described above, basic glyphs are predefined by key points, width values, feature points that have predefined spatial relationship to the key points and width values, and curve ratios prestored in a curve level table. The method first retrieves a set of characters to be defined. Then, the method selects one character, and further selects one glyph out of the character. Next, the method retrieves a predefined basic glyph that most closely matches the selected glyph topographically. Thereafter, the method fits an outline shape of the retrieved basic glyph to an outline shape of the selected glyph by changing the key points and width values of the basic glyph. As noted above, the key points and width values have been predefined so that manipulation of these values will cause the outline shape of the basic glyph to transform. Next, the method stores the selected glyph with its key points and width values. The method repeats the above process until all glyphs in the set of characters are defined.
The method of defining a set of characters using a set of predefined basic glyphs can also be performed manually using a computer graphical user interface tool, or automatically using suitable image analysis techniques.
In accordance with a further aspect of the invention, the method of defining characters may identify a key point that requires a predetermined specific display location with respect to a bitmap cell upon which the key point falls. The method may label such a key point with hint information, to avoid jamming or distortion of a character upon display, in particular in low resolution.
In accordance with a still further aspect of the invention, a method of generating (rendering) characters that have been defined based on a set of basic glyphs for display is provided. The method allows for high-quality display of the characters regardless of a particular resolution level of an output device used. The method first selects a character for display on the output device. The character consists of one or more glyphs, and each glyph forming the character is predefined by key points, width values, feature points that have predefined spatial relationship to the key points and width values, and curve ratios prestored in a curve level table. Next, the method determines the resolution of the output device. Then, for each glyph forming the character, the method retrieves curve ratios from the prestored curve level table according to the determined resolution of the output device. Finally, the method renders the glyphs of the selected character on the output device according to the key points, the width values, the feature points, and the retrieved curve ratios.
In accordance with an even further aspect of the invention, rendering of a character for display includes filling within the outlines of the glyphs that form the character. Each glyph is predivided into one or more single run-length regions, so that filling within the glyph""s outline includes filling each single run-length region separately at the time of output.
Accordingly, the present invention provides a method for generating a glyph-based outline font, which has a relatively low memory requirement and is well suited for font communication between various devices having different resolutions. Because the method defines and generates curve segments that define the outline of each glyph with greater detail at a higher resolution level, the method can produce a high-quality display in high resolution as well as in low resolution.